import Layout from '@/layout'

const product = {
  path: '/merchandise',
  component: Layout,
  redirect: '/merchandise/combo',
  name: 'merchandise',
  meta: { title: 'commodity', icon: 'list' },
  children: [
    {
      path: 'combo',
      name: 'Combo',
      component: () => import('@/views/merchandise/combo'),
      redirect: '/merchandise/combo/hotel',
      meta: { title: 'package', roles: ['hotel', 'ktv', 'other', 'scenic', 'cate'] },
      children: [
        {
          path: 'hotel',
          name: 'Hotel',
          component: () => import('@/views/merchandise/combo/children/hotel/index.vue'),
          meta: { title: 'hotel', roles: ['hotel'] },
          children: [
            {
              path: 'detail',
              name: 'hotelDetail',
              component: () => import('@/views/merchandise/combo/children/hotel/children/detail.vue'),
              meta: { title: 'theHotelDetails', roles: ['hotel'] },
              hidden: true
            },
            {
              path: 'add-one',
              name: 'HotelAddOne',
              component: () => import('@/views/merchandise/combo/children/hotel/children/addOne.vue'),
              meta: { title: 'hotelSetting', roles: ['hotel'] },
              hidden: true
            },
            {
              path: 'add-second',
              name: 'HotelAddSecond',
              component: () => import('@/views/merchandise/combo/children/hotel/children/addSecond.vue'),
              meta: { title: 'hotelSettingTwo', roles: ['hotel'] },
              hidden: true
            }
          ]
        },
        {
          path: 'ktv',
          name: 'Ktv',
          component: () => import('@/views/merchandise/combo/children/ktv/index.vue'),
          meta: { title: 'Ktv', roles: ['ktv'] },
          children: [
            {
              path: 'detail',
              name: 'KtvDetail',
              component: () => import('@/views/merchandise/combo/children/ktv/children/detail.vue'),
              meta: { title: 'ktvDetails' },
              hidden: true
            },
            {
              path: 'add-one',
              name: 'KtvAddOne',
              component: () => import('@/views/merchandise/combo/children/ktv/children/addOne.vue'),
              meta: { title: 'KtvSetting' },
              hidden: true
            },
            {
              path: 'add-second',
              name: 'KtvAddSecond',
              component: () => import('@/views/merchandise/combo/children/ktv/children/addSecond.vue'),
              meta: { title: 'KtvSettingTwo' },
              hidden: true
            }
          ]
        },
        {
          path: 'cate',
          name: 'Cate',
          component: () => import('@/views/merchandise/combo/children/cate/index.vue'),
          meta: { title: 'cate', roles: ['cate'] },
          children: [
            {
              path: 'detail',
              name: 'CateDetail',
              component: () => import('@/views/merchandise/combo/children/cate/children/detail.vue'),
              meta: { title: 'cateDetails', roles: ['cate'] },
              hidden: true
            },
            {
              path: 'add-one',
              name: 'CateAddOne',
              component: () => import('@/views/merchandise/combo/children/cate/children/addOne.vue'),
              meta: { title: 'cateSetting', roles: ['cate'] },
              hidden: true
            },
            {
              path: 'add-second',
              name: 'CateAddSecond',
              component: () => import('@/views/merchandise/combo/children/cate/children/addSecond.vue'),
              meta: { title: 'cateSettingTwo', roles: ['cate'] },
              hidden: true
            }
          ]
        },
        {
          path: 'scenic',
          name: 'Comboscenic',
          component: () => import('@/views/merchandise/combo/children/scenic/scenic.vue'),
          meta: { title: 'scenic', roles: ['scenic'] },
          children: [
            {
              path: 'detail',
              name: 'ComboScenicDetail',
              component: () => import('@/views/merchandise/combo/children/scenic/children/detail.vue'),
              meta: { title: 'scenicDetails', roles: ['scenic'] },
              hidden: true
            },
            {
              path: 'add-one',
              name: 'ScenicAddOne',
              component: () => import('@/views/merchandise/combo/children/scenic/children/addOne.vue'),
              meta: { title: 'scenicSetting', roles: ['scenic'] },
              hidden: true
            },
            {
              path: 'add-second',
              name: 'ScenicAddSecond',
              component: () => import('@/views/merchandise/combo/children/scenic/children/addSecond.vue'),
              meta: { title: 'scenicSettingTwo', roles: ['scenic'] },
              hidden: true
            }
          ]
        },
        {
          path: 'inventory',
          name: 'Inventory',
          redirect: '/merchandise/combo/inventory/num',
          component: () => import('@/views/merchandise/combo/children/inventory/inventory.vue'),
          meta: { title: 'inventory', roles: ['hotel', 'scenic'] },
          children: [
            {
              path: 'num',
              name: 'Num',
              component: () => import('@/views/merchandise/combo/children/inventory/children/num.vue'),
              meta: { title: 'inventoryNum', roles: ['hotel', 'scenic'] },
              hidden: true
            },
            {
              path: 'price',
              name: 'Price',
              component: () => import('@/views/merchandise/combo/children/inventory/children/price.vue'),
              meta: { title: 'inventoryPrice', roles: ['hotel', 'scenic'] },
              hidden: true
            }
          ]
        },
        {
          path: 'other',
          name: 'Other',
          component: () => import('@/views/merchandise/combo/children/other/index.vue'),
          meta: { title: 'other', roles: ['other'] },
          children: [
            {
              path: 'detail',
              name: 'OtherDetail',
              component: () => import('@/views/merchandise/combo/children/other/children/detail.vue'),
              meta: { title: 'otherDetails', roles: ['other'] },
              hidden: true
            },
            {
              path: 'add-one',
              name: 'OtherAddOne',
              component: () => import('@/views/merchandise/combo/children/other/children/addOne.vue'),
              meta: { title: 'otherSetting', roles: ['other'] },
              hidden: true
            },
            {
              path: 'add-second',
              name: 'OtherAddSecond',
              component: () => import('@/views/merchandise/combo/children/other/children/addSecond.vue'),
              meta: { title: 'otherSettingTwo', roles: ['other'] },
              hidden: true
            }
          ]
        }
      ]
    },
    {
      path: 'product',
      name: 'Product',
      component: () => import('@/views/merchandise/product/index.vue'),
      meta: { title: 'product', roles: ['hotel', 'ktv', 'other', 'scenic', 'cate'] },
      redirect: '/merchandise/product/productList',
      children: [
        {
          path: 'productList',
          name: 'ProductList',
          component: () => import('@/views/merchandise/product/productList.vue'),
          meta: { title: 'productList', roles: ['hotel', 'ktv', 'other', 'scenic', 'cate'] },
          children: [
            {
              path: 'productAdd',
              name: 'ProductAdd',
              component: () => import('@/views/merchandise/product/children/productAdd.vue'),
              meta: { title: 'productAdd', roles: ['hotel', 'ktv', 'other', 'scenic', 'cate'] },
              hidden: true
            },
            {
              path: 'productEdit',
              name: 'ProductEdit',
              component: () => import('@/views/merchandise/product/children/productEdit.vue'),
              meta: { title: 'productEdit', roles: ['hotel', 'ktv', 'other', 'scenic', 'cate'] },
              hidden: true
            }
          ]
        },
        {
          path: 'classify',
          name: 'Classify',
          component: () => import('@/views/merchandise/product/classify.vue'),
          meta: { title: 'classify', roles: ['hotel', 'ktv', 'other', 'scenic', 'cate'] }
        }
      ]
    }
  ]
}
export default product
